package huawei.exam3;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author : Rookie
 * @description :
 * @date : 2023/2/1
 */
public class HJ53 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int index = scanner.nextInt();
        int length = 2 * index - 1;
        // 构建杨辉三角
        int[][] arr = new int[index][length];
//        arr[0][index - 1] = 1;

        for(int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                if (j == 0 || j == arr[i].length - 1) {
                    arr[i][j] = 1;
                } else {
                    arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j] + arr[i - 1][j + 1];
                }
            }
        }
        List<Integer> integers = new ArrayList<>();

        for(int i = 0; i < arr.length; i++){
            for(int j = 0; j <arr[i].length; j++) {
                if (i == index - 1) {
                    integers.add(arr[i][j]);
                }
            }
        }

        int evenNumIndex = -1;
        for (int i = 0; i < integers.size(); i++) {
            if (integers.get(i) % 2 == 0) {
                evenNumIndex = i;
                break;
            }
        }
        System.out.println(evenNumIndex);
    }
}
